<?php
class OtherAction extends BaseAction
{
    public function index()
    {
        $name = $this->_get('name');
        $routes = array('about', 'partner', 'links');
        $title = array();
        $title['about'] = '关于我们';
        $title['partner'] = '合作伙伴';
        $title['links'] = '友情链接';
        if (array_search($name, $routes) === false) {
            $this->display();
        } else {
            if ($name == 'partner') {
                $MarketModel = D('Market');
                $malls = $MarketModel->getIndexData();
                foreach ($malls as $k => $v) {
                    $malls[$k]['url'] = U('/' . $v['initial']);
                    $malls[$k]['image_url'] = $MarketModel->getMarketImage($v['image']);
                }
                $this->assign('malls', $malls);
            } else if ($name == 'links') {
                //友情链接
                $types = D('Link')->getTypeLinks();
                $this->assign('types', $types);
            }
            $this->reset('web_title', $title[$name]);
            $this->display($name);
        }
    }
}

?>